package com.jzy.gulimall.product;

import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.cloud.openfeign.EnableFeignClients;
import org.springframework.session.data.redis.config.annotation.web.http.EnableRedisHttpSession;

/**
 *
 * sentinel限流熔断降级   https://github.com/alibaba/Sentinel/wiki/%E7%86%94%E6%96%AD%E9%99%8D%E7%BA%A7
 *  定义资源:   sentinelResourse(方法)   try/catch(代码块)
 *  自定义流控降级返回:  统一处理:SentinelException  局部处理:blockHandler指定处理类(同方法内)    fallback(异常处理)
 *  调用方熔断保护:    feign:sentinel:enabled: true      SeckillFeignFallBack
 *      调用方手动指定远程服务的降级策略
 *  提供方也可以设置熔断降级
 *  网关统一处理:
 *
 */
@EnableRedisHttpSession
@SpringBootApplication
@EnableFeignClients(basePackages = "com.jzy.gulimall.product.feign")
public class GulimallProductApplication {

    public static void main(String[] args) {
        SpringApplication.run(GulimallProductApplication.class, args);
    }

}
